//package com.example.tests;

import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.util.regex.Pattern;

public class Con_CustomerThankyou_VerifyText extends SeleneseTestCase {
	@Before
	public void setUp() throws Exception {
		selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://www.gfwfn.com/");
		selenium.start();
	}

	@Test
	public void testUntitled() throws Exception {
		selenium.open("/");
		selenium.click("css=img[alt=\"Enroll\"]");
		selenium.waitForPageToLoad("30000");
		selenium.type("id=txtZip", "01234");
		selenium.type("id=txtRadius", "10");
		selenium.click("name=submit");
		selenium.waitForPageToLoad("30000");
		selenium.click("link=Test Dealership");
		selenium.waitForPageToLoad("30000");
		selenium.open("/CustomerThankyou.php");
		verifyTrue(selenium.isElementPresent("id=header"));
		verifyTrue(selenium.isElementPresent("css=img[alt=\"Check out the all-new 2013 Fusion\"]"));
		verifyTrue(selenium.isElementPresent("id=header"));
		verifyTrue(selenium.isElementPresent("id=header"));
		verifyTrue(selenium.isElementPresent("css=h2"));
		verifyTrue(selenium.isTextPresent("CONGRATULATIONS John Thompson"));
		verifyTrue(selenium.isTextPresent("You are now registered for GO FURTHER WITH FORD NIGHT at Test Dealership."));
		verifyTrue(selenium.isElementPresent("css=p"));
		verifyTrue(selenium.isElementPresent("css=strong"));
		verifyTrue(selenium.isElementPresent("//div[@id='cons1e']/p[2]"));
		verifyTrue(selenium.isElementPresent("css=h3"));
		verifyTrue(selenium.isElementPresent("css=label.w120"));
		verifyTrue(selenium.isElementPresent("//div[@id='cons1e']/p[4]/label"));
		verifyTrue(selenium.isElementPresent("//div[@id='cons1e']/p[5]/label"));
		verifyTrue(selenium.isElementPresent("//div[@id='cons1e']/p[6]/label"));
		verifyTrue(selenium.isElementPresent("css=label.w140"));
		verifyTrue(selenium.isElementPresent("//div[@id='cons1e']/p[4]/label[2]"));
		verifyTrue(selenium.isElementPresent("//div[@id='cons1e']/p[5]/label[2]"));
		verifyTrue(selenium.isElementPresent("//div[@id='cons1e']/p[6]/label[2]"));
		verifyTrue(selenium.isElementPresent("css=a[name=\"fb_share\"] > img"));
		verifyTrue(selenium.isElementPresent("css=a.twitter-share-button > img"));
		verifyTrue(selenium.isElementPresent("link=Click here"));
		verifyTrue(selenium.isElementPresent("css=#regForm > p"));
		verifyTrue(selenium.isTextPresent("Click here to go to Random Acts of Fusion"));
		verifyTrue(selenium.isElementPresent("name=submit"));
		verifyTrue(selenium.isElementPresent("css=p.alignLeft.aiDisclaimer"));
		verifyTrue(selenium.isElementPresent("link=www.americanidol.com"));
		verifyTrue(selenium.isElementPresent("link=Official Rules"));
		verifyTrue(selenium.isElementPresent("link=Privacy Statement"));
		verifyTrue(selenium.isElementPresent("link=CA Privacy Statement"));
		selenium.click("link=Official Rules");
		selenium.click("link=Privacy Statement");
		selenium.click("link=CA Privacy Statement");
		selenium.click("css=img[alt=\"Check out the all-new 2013 Fusion\"]");
	}

	@After
	public void tearDown() throws Exception {
		selenium.stop();
	}
}
